Skip to content

[9.5] (backport #15457) Prepare SSH key before provisioning VM instances in test runner#15469

Open
mergify[bot] wants to merge 1 commit into
9.5from
mergify/bp/9.5/pr-15457
Open

[9.5] (backport #15457) Prepare SSH key before provisioning VM instances in test runner#15469
mergify[bot] wants to merge 1 commit into
9.5from
mergify/bp/9.5/pr-15457

Conversation

@mergify

@mergify mergify Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes a bug where integration tests running on cloud VM instances failed because the SSH key used to reach those instances wasn't ready yet when the VM was being provisioned. The provisioning step now waits for the SSH key to exist first, so cloud-based test runs work again.

This was introduced in #15422 and detected in #15449 (comment)


This is an automatic backport of pull request #15457 done by Mergify.

@mergify mergify Bot added the backport label Jul 11, 2026
@mergify mergify Bot requested a review from a team as a code owner July 11, 2026 17:14
@mergify mergify Bot added the backport label Jul 11, 2026
@mergify mergify Bot requested review from blakerouse and swiatekm and removed request for a team July 11, 2026 17:14
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@infra-vault-gh-plugin-prod

infra-vault-gh-plugin-prod Bot commented Jul 11, 2026

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

TL;DR

All 14 reported failures share one deterministic compile error in pkg/testing/runner/runner.go; this is a backport incompatibility, not a packaging, FIPS, architecture, or infrastructure failure. Remove the 13-line hunk added by this backport (or rework it against the 9.5 implementation) and rerun CI.

Remediation

  • Drop the added block in Run that redeclares sshAuth/repoArchive and calls r.prepare(prepareCtx, cacheDir). The 9.5 branch already prepares with sshAuth, repoArchive, err := r.prepare(prepareCtx) before startStacks (around lines 133-139), so the requested ordering is already present.
  • Re-run check-ci and the unit/package jobs after the source compiles.
Investigation details

Root Cause

The PR diff inserts a second preparation block after startStacks, declaring sshAuth and repoArchive again and passing cacheDir to r.prepare. On 9.5, prepare has the signature prepare(context.Context), and the existing call at pkg/testing/runner/runner.go:133-139 already performs preparation before provisioning. The backport therefore produces both redeclaration errors and an invalid call.

Evidence

  • Build: https://buildkite.com/elastic/elastic-agent/builds/42818
  • Job: check-ci
  • Key log excerpt: pkg/testing/runner/runner.go:149:6: sshAuth redeclared, runner.go:150:6: repoArchive redeclared, runner.go:153:53: undefined: cacheDir, and too many arguments in call to r.prepare (the existing signature accepts only context.Context).
  • The same compiler error appears in the Ubuntu, requirefips, fips140-only, amd64/arm64 package, container, and cross-package logs; failures occur before tests or artifacts are produced.
  • No matching flaky-test issue was found.

Verification

Not run locally; diagnosis is based on the Buildkite logs, PR diff, and the 9.5 source implementation.


What is this? | From workflow: PR Buildkite Detective

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant